<@t.header> </@t.header> <@t.body>
<div class="navbar navbar-default navbar-fixed-top">
	<div class="container-fluid">
		<div class="navbar-header">
			<div class=" btn navbar-toggle collapsed" data-toggle="collapse" data-target="#left-menu-collapse" aria-expanded="false">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</div>
			<div class="navbar-brand" href="#">
				<img src="${request.contextPath}/img/hetong2.fw.png" style="width: 30px; margin-top: -5px; height: 30px; display: inline-block;">
				${Session['sys_name']}
			</div>
		</div>

		<div class="collapse navbar-collapse" id="left-menu-collapse">
			<p class="navbar-text navbar-right">
				<i class="icon-signout"></i>
				<a href="${request.contextPath}/logout" class="navbar-link"> 退出 </a>
				&nbsp;
			</p>
			<#setting url_escaping_charset='utf-8'>
			<p class="navbar-text navbar-right hidden-xs">
				<i class="icon-th-large"></i>
				<a href="${request.contextPath}/download/_decode/b-decode.docx/${('投标编码管理.docx')?url}" target="blank" class="navbar-link">投标编码规范</a>
			</p>
			<p class="navbar-text navbar-right hidden-xs">
				<i class="icon-th-large"></i>
				<a href="${request.contextPath}/download/_decode/c-decode.docx/${('合同编码管理.docx')?url}" target="blank" class="navbar-link">合同编码规范</a>
			</p>
			<p class="navbar-text navbar-right hidden-xs">
				<i class="icon-th-large"></i>
				<a href="${request.contextPath}/software/index" target="blank" class="navbar-link">常用软件</a>
			</p>
			<#if roles.systemManager>
			<p class="navbar-text navbar-right">
				<i class="icon-leaf"></i>
				<a href="${request.contextPath}/config/index" class="navbar-link"> 系统配置 </a>
			</p>
			</#if>
		
			<#if roles.canViewCountHtMoney>
			<p class="navbar-text navbar-right hidden-xs contract-count-for-ld"></p>
			</#if>

			<div class="left-menu">
				<div class="user-info">
					<i class="icon-user"></i>
					${Session['login_user'].name}
					<i class="icon-cog text-primary user-config" style="cursor: pointer;"></i>
				</div>

				<div class="menu-info">
					<div class="left-tree-menu"></div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="container-fluid index-container suredy-content">
	<div class="col-md-12 text-center text-danger">
		<h1>欢迎使用</h1>
	</div>
</div>
</@t.body> <@t.foot>
<!-- <script src="${request.contextPath}/js/suredy-tree-menu.js"></script>
<script src="${request.contextPath}/js/suredy-modal.js"></script> -->
<script type="text/javascript">
	require([ 'suredyModal', 'suredyTreeMenu' ], function(Modal, TreeMenu) {
		$('i.user-config').on('click', function() {
			Modal.showModal({
				title : '修改密码',
				showFoot : false,
				icon : 'icon-cog',
				uri : '${request.contextPath}/user-config'
			});
		});

		TreeMenu('.left-tree-menu', '${request.contextPath}/config/menu/user', {
			size : 'lg'
		});
		
		var d = Suredy.loadData('${request.contextPath}/index/countract-count');
		
		if (d) {
			var container = $('.contract-count-for-ld');
			$.each(d, function(i, v) {
				var item = '<div href="javascript:;" class="item hidden" style="text-decoration: underline;">' + i + '年：收款合同' + Suredy.formatMoney(v[0]) + '；付款合同' + Suredy.formatMoney(v[1]) + '</div>';
				
				container.append(item);
			});
			
			window.setInterval(function() {
				var comp = $('.contract-count-for-ld');
				var active = comp.find('.item.active').first();
				
				if (active.length === 0)
					active = comp.find('.item').first();
	
				//comp.find('.item').addClass('hidden').removeClass('active');
				
				var next = active.find('~.item').first();
				
				if (next.length === 0)
					next = comp.find('.item').first();
				
				active.fadeToggle(function() {
					$(this).addClass('hidden').removeClass('active');
					next.fadeToggle(function() {
						$(this).addClass('active').removeClass('hidden');
					});
				});
			}, 6000);
		}
	});
</script>
</@t.foot>
